##have = []
##n = int(input())
##for i in range(n):
##    string = input()
##    if string in have:
##        continue
##    have.append(string)
##    print(string)

    
a = list(input())
j = len(a) - 1
for i in range (len(a)):
    if i < j:
        if a[i] == a[j]:
            j -= 1
        else:
            a.insert(j + 1, a[i])
print("".join(a))

